]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
NetworkMenu: show the device name instead of Bluetooth
authorGiovanni Campagna <gcampagna@src.gnome.org>
Tue, 28 Jan 2014 20:30:28 +0000 (21:30 +0100)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Thu, 6 Feb 2014 18:07:47 +0000 (19:07 +0100)
To distinguish the bluetooth network menu from the bluetooth
menu proper, use the device name as the label.
Also, replace Connect with "Use as Internet connection"

https://bugzilla.gnome.org/show_bug.cgi?id=709353

js/ui/status/network.js

index 1d6d7c5646720a89a4eb39feb1457e00a50ddd2e..696e898cdde07b0562ee4da5f51343d645e09a4f 100644 (file)
@@ -131,7 +131,7 @@ const NMConnectionItem = new Lang.Class({
 
     _sync: function() {
         let isActive = this.isActive();
-        this.labelItem.label.text = isActive ? _("Turn Off") : _("Connect");
+        this.labelItem.label.text = isActive ? _("Turn Off") : this._section.getConnectLabel();
         this.switchItem.setToggleState(isActive);
         this.switchItem.setStatus(this._getStatus());
         this.emit('icon-changed');
@@ -223,6 +223,10 @@ const NMConnectionSection = new Lang.Class({
         return _("Off");
     },
 
+    getConnectLabel: function() {
+        return _("Connect");
+    },
+
     _hasConnection: function(connection) {
         return this._connectionItems.has(connection.get_uuid());
     },
@@ -566,6 +570,14 @@ const NMDeviceBluetooth = new Lang.Class({
             return 'network-cellular-signal-none-symbolic';
     },
 
+    _getDescription: function() {
+        return this._device.name;
+    },
+
+    getConnectLabel: function() {
+        return _("Use as Internet connection");
+    },
+
     getIndicatorIcon: function() {
         let state = this._device.active_connection.state;
         if (state == NetworkManager.ActiveConnectionState.ACTIVATING)